package com.ruoyi.df.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ProcessStopException;
import com.ruoyi.df.domain.DensityMergeParam;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.io.File;
import java.rmi.ServerException;
import java.util.Date;
import java.util.List;
import java.util.Map;


public interface AtmosphericDensityGridService {

    AjaxResult getMergeData(Map<String, Object> map) throws ProcessStopException;

    AjaxResult getNewMergeData(DensityMergeParam map) throws ProcessStopException, ServerException;

    SseEmitter push(String id, String flag);

    AjaxResult save(List<Map<String, Object>> list);

    List<Map<String, Object>> selectList(String staName, String startTime, String endTime, String tableName);

    //AjaxResult getTimeNormalization(Map<String, Object> map);

    AjaxResult show(String path);

    /**
     * 计算地方时格网化数据
     *
     * @param time
     * @param hight
     * @param sseId
     * @return 计算的结果 ['',文本,图片]
     */
    String[] calculateGrid(Date time, Integer hight, String sseId);

    /**
     * 保存计算的结果
     *
     * @param time
     * @param hight
     * @return 待下载的文件
     */
    File calculateGridSave(Date time, Integer hight);
}
